package com.hq.fxh.No5_User.MyModle;

import java.io.Serializable;

/**
 * Created by Lenovo on 2016/11/22.
 */
public class AdBannerInfo extends AdInfo{


    private AdvertDetailBean advert_detail;

    public AdvertDetailBean getAdvert_detail() {
        return advert_detail;
    }

    public void setAdvert_detail(AdvertDetailBean advert_detail) {
        this.advert_detail = advert_detail;
    }

    public static class AdvertDetailBean  implements Serializable {
        private Boolean isSelected;//自己添加的
        private Boolean bigAdSelected;//大图广告设置只选择一个
        private Integer during;//贴片广告广告时间
        private Integer action;//贴片广告动作，1 跳转链接； 2 拨打电话
        private String pic;//除了店铺广告其他都有
        private String href;//banner 图文
        private String name;
        private String des;
        private String mobile;
        private String address;
        private String QQ;
        private ProductInfoBean product_info;
        private OwnerInfoBean owner_info;

        public Boolean getBigAdSelected() {

            return bigAdSelected;
        }

        public void setBigAdSelected(Boolean bigAdSelected) {
            this.bigAdSelected = bigAdSelected;
        }

        public Boolean getSelected() {
            return isSelected;
        }

        public void setSelected(Boolean selected) {
            isSelected = selected;
        }

        public Integer getDuring() {
            return during;
        }

        public void setDuring(Integer during) {
            this.during = during;
        }

        public Integer getAction() {
            return action;
        }

        public void setAction(Integer action) {
            this.action = action;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDes() {
            return des;
        }

        public void setDes(String des) {
            this.des = des;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getQQ() {
            return QQ;
        }

        public void setQQ(String QQ) {
            this.QQ = QQ;
        }

        public String getPic() {
            return pic;
        }

        public void setPic(String pic) {
            this.pic = pic;
        }

        public String getHref() {
            return href;
        }

        public void setHref(String href) {
            this.href = href;
        }

        public ProductInfoBean getProduct_info() {
            return product_info;
        }

        public void setProduct_info(ProductInfoBean product_info) {
            this.product_info = product_info;
        }

        public OwnerInfoBean getOwner_info() {
            return owner_info;
        }

        public void setOwner_info(OwnerInfoBean owner_info) {
            this.owner_info = owner_info;
        }

        public static class ProductInfoBean  implements Serializable {
            private String pic;
            private String name;
            private String price;
            private String href;

            public String getPic() {
                return pic;
            }

            public void setPic(String pic) {
                this.pic = pic;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getPrice() {
                return price;
            }

            public void setPrice(String price) {
                this.price = price;
            }

            public String getHref() {
                return href;
            }

            public void setHref(String href) {
                this.href = href;
            }
        }

        public static class OwnerInfoBean  implements Serializable {
            private String pic;
            private String name;
            private String mobile;
            private String wechat;

            public String getPic() {
                return pic;
            }

            public void setPic(String pic) {
                this.pic = pic;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getMobile() {
                return mobile;
            }

            public void setMobile(String mobile) {
                this.mobile = mobile;
            }

            public String getWechat() {
                return wechat;
            }

            public void setWechat(String wechat) {
                this.wechat = wechat;
            }
        }
    }

    @Override
    public String toString() {
        if(advert_detail.getOwner_info()==null){
            return "模板{" +
                    "name=" + advert_detail.getName() +" mobile="+advert_detail.getMobile()+
                    " address="+advert_detail.getAddress()+" action="+advert_detail.getAction()+" qq="+advert_detail.getQQ()+
                    " herf="+advert_detail.getHref()+ " pic="+advert_detail.getPic()+
                    " bigadselected"+advert_detail.getBigAdSelected()+" des"+advert_detail.getDes()+"during"+advert_detail.getDuring()+'}';
        }else {
            return "店主{"+ "name"+advert_detail.getOwner_info().getName()+" pic"+advert_detail.getOwner_info().getPic()+"wechat"
                    +advert_detail.getOwner_info().getWechat()+" mobile"+advert_detail.getOwner_info().getMobile()+"}  " +
                    "商品{"+"name"+advert_detail.getProduct_info().getName()+"herf"+advert_detail.getProduct_info().getHref()+
                    "pic"+advert_detail.getProduct_info().getPic()+" price"+advert_detail.getProduct_info().price+"}";
        }


    }

}
